package awConnectionService;


import java.util.ArrayList;

import javax.jws.WebMethod;
import javax.jws.WebService;

import entities.Device;
import entities.User;

@WebService
public interface ConnectionService {
	@WebMethod public void addDevice(Device d);
	@WebMethod public void updateDevice(Device d);
	@WebMethod public void removeDevice(Device d);
	@WebMethod public void connectDevices(String hostUUID, String targetIp, String pairKey);
	@WebMethod public Device getDeviceByUUID(String UUID);
	@WebMethod public Device getDeviceByIp(String ip);
	@WebMethod public ArrayList<Device> getDevicesByUser(String userId);
	
	@WebMethod public void insertDevicePair(String uuid, String pairKey);
	@WebMethod public void removeDevicePair(String uuid);
	@WebMethod public void updateDevicePair(String uuid, String pairKey);
	@WebMethod public String getDevicePair(String uuid);
	
	//For Android App
	@WebMethod public void addDeviceAnd(String UUID, String name, String ip, String type, ArrayList<String> connections);
	@WebMethod public void updateDeviceAnd(String UUID, String name, String ip, String type, ArrayList<String> connections);
	@WebMethod public void removeDeviceAnd(String UUID, String name, String ip, String type, ArrayList<String> connections);
	
	//User
	@WebMethod public User getUser(String username);
	@WebMethod public void addUserDevice(String uuid, String id);
//	@WebMethod public 
	@WebMethod public void addUser(User user);
	@WebMethod public void addUserAnd(String username, String password, String fname, String lname, String email, String role);
//	@WebMethod public void updateUser(User user);
//	@WebMethod public void updateUserAnd(String username, String password, String fname, String lname, String email, String role);
}
